# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: JJDaNiMoTh <jjdanimoth.aur@gmail.com>
# Contributor: Tan Xiang <txcary@gmail.com>

pkgname=wqy-bitmapfont
pkgver=1.0.0RC1
pkgrel=5
pkgdesc="A bitmapped Song Ti (serif) Chinese font"
arch=('any')
url="https://wenq.org/"
license=('GPL2' 'custom:"font embedding exception"')
source=("https://downloads.sourceforge.net/project/wqy/wqy-bitmapfont/${pkgver/RC/-RC}/wqy-bitmapsong-pcf-${pkgver/RC/-RC}.tar.gz")
sha256sums=('d2ebf091151bbc9d2b7a64e794ff1d12546368155dea2ba435805313f0933bbb')

package() {
  cd "$srcdir"/wqy-bitmapsong

  install -Dm644 *.pcf -t "$pkgdir"/usr/share/fonts/wenquanyi

  install -Dm644 85-wqy-bitmapsong.conf -t "$pkgdir"/usr/share/fontconfig/conf.avail
  install -d "$pkgdir"/usr/share/fontconfig/conf.default
  ln -s ../conf.avail/85-wqy-bitmapsong.conf -t "$pkgdir"/usr/share/fontconfig/conf.default

  install -D -m644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname
}
